IRS Question Recommendation System

This notebook helps train a recommendation system based on student ratings on questions. The predicted ratings of the recommender system would be stored in a MySQL table for the linear regression and clustering models to use.

To get data from the database, utilize IRS's database app service to get the recommender data from the recommenderData caching table.

Visualize the raw data from the MySQL server to find potential clusters of users.

Use Surprise's data reader to create dataset with the returned data frame of users, questions, and ratings.

Split the dataset to a training and testing set.

Train the recommender system with the K-Nearest Neighbors algorithm. Test the system with the test set and print out the root means squared error.

Predict how user_3889 would rate question 23

Create a rating heatmap of the model.

Get questions unrated from users from the database.

For IRS purposes, use the recommender system to predict ratings and place predicted ratings in a new caching table.